import request from '@/utils/request'

// 查询培训学习列表
export function listTraining(query) {
  return request({
    url: '/safetyTraining/training/list',
    method: 'get',
    params: query
  })
}

// 查询培训学习详细
export function getTraining(stId) {
  return request({
    url: '/safetyTraining/training/' + stId,
    method: 'get'
  })
}

// 新增培训学习
export function addTraining(data) {
  return request({
    url: '/safetyTraining/training',
    method: 'post',
    data: data
  })
}

// 修改培训学习
export function updateTraining(data) {
  return request({
    url: '/safetyTraining/training',
    method: 'put',
    data: data
  })
}

// 删除培训学习
export function delTraining(stId) {
  return request({
    url: '/safetyTraining/training/' + stId,
    method: 'delete'
  })
}
